// 提取url
export const param2Obj = url => {
     const search = url.split('?')[1]
     if (!search) {
         return {}
     }
     return JSON.parse(
         '{"' + decodeURIComponent(search)
         .replace(/"/g, '\\"')
         .replace(/&/g, '","')
         .replace(/=/g, '":"') + '"}')
        // 字符串转对象需要转义
 }